//
//  KButton.m
//  newView
//
//  Created by yjl on 14-5-27.
//  Copyright (c) 2014年 上海傲融软件公司. All rights reserved.
//

#import "KButton.h"

@implementation KButton

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
    }
    return self;
}

-(id)initWithCoder:(NSCoder *)aDecoder
{
    if (self =[super initWithCoder:aDecoder]) {
        UIImage *originalImage = [UIImage imageNamed:@"btn.png"];
        UIEdgeInsets insets = UIEdgeInsetsMake(20, 20, 20, 20);
        UIImage *stretchableImage = [originalImage resizableImageWithCapInsets:insets];
        [self setBackgroundImage:stretchableImage forState:UIControlStateNormal];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
